n = float(input("请输入公里数："))
if n <= 3:
    cost = 10
elif n <= 15:
    cost = 10 + (n - 3) * 2.1
else:
    cost = 10 + (15 - 3) * 2.1 + (n - 15) * 3.15
print(f"总费用为：{cost:.2f}元")
